<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>供应商基本信息</title>
		<link rel="stylesheet" href="../../command/Bootstrap/bootstrap-3.3.0/css/bootstrap.min.css" />
		<link rel="stylesheet" href="../../command/bower_components/bootstrap-treeview/dist/bootstrap-treeview.min.css" />
		<link rel="stylesheet" href="../../command/bower_components/bootstrap-table/dist/bootstrap-table.min.css" />
		<script src="../../command/jquery-3.4.0.min.js"></script>
		<script src="../../command/Bootstrap/bootstrap-3.3.0/js/bootstrap.min.js"></script>
		<script src="../../command/bower_components/bootstrap-treeview/dist/bootstrap-treeview.min.js"></script>
		<script src="../../command/bower_components/moment/min/moment.min.js"></script>
		<script src="../../command/bower_components/moment/min/locales.min.js"></script>
		<script src="../../command/bower_components/bootbox/bootbox.min.js"></script>
		<script src="../../command/bower_components/bootstrap-select/js/bootstrap-select.js"></script>
		<script src="../../command/bower_components/bootstrap-switch/dist/js/bootstrap-switch.min.js"></script>
		<script src="../../command/bower_components/bootstrap-table/dist/bootstrap-table.min.js"></script>
		<script src="../../command/bower_components/bootstrap-table/dist/locale/bootstrap-table-zh-CN.js"></script>
		<script src="../../command/bower_components/moment/min/moment-with-locales.min.js"></script>
		<script type="application/javascript">
			$(function() {
				//读取数据类型
				$.ajax({
					type: "get", //提交类型
					dataTyp: "json", //数据类型
					url: "../../json/jibenmessage.json", //数据访问路径
					success: function(reslt) { //返回成功后所调用得函数
						createTable(reslt); //函数调用
					},
					error: function(date) { //返回失败所调用得函数
						alert(date);
					}
				});
				/*新增点击按钮事件*/
				$("#btnNew").click(function() {
					$("#Divdata").modal();
				});
				/*修改点击按钮事件*/
				$("#btnUpdate").click(function() {
					$("#Divdata").modal();
				});
				/*删除点击按钮事件*/
				$("#btnDel").click(function() {
					$("#Divdata").modal();
				});
				$("#btnEnd").click(function() {
					$("#Divdata").modal();
				});
			});
			/*将数据绑定在表格上*/
			function createTable(comData) {
				console.log(comData);
				$("#tblComputer").bootstrapTable("destroy"); //清空表格
				$("#tblComputer").bootstrapTable({
					data: comData,
					loadMsg: "正在加载数据",
					sidePagination: "client",
					pageSize: "5", //分页
					pagination: true,

					columns: [{
							field: "state",
							checkbox: true,
							align: "center"
						},
						{
							field: "uname",
							title: "供应商姓名",
							align: "center"
						},
						{
							field: "comaddress",
							title: "分类",
							align: "center"
						},
						{
							field: "dnum",
							title: "联系人",
							align: "center"
						},
						{
							field: "fpinpai",
							title: "联系电话",
							align: "center"
						},
						{
							field: "cshang",
							title: "公司地址",
							align: "center"
						},
						{
							field: "cshangnum",
							title: "服务范围",
							align: "center"
						},
						{
							field: "uidnum",
							title: "法人姓名",
							align: "center"
						},
						{
							field: "uiddata",
							title: "联系方式",
							align: "center"
						},
						{
							field: "qujian",
							title: "成立日期",
							align: "center"
						},
						{
							field: "qujian",
							title: "状态",
							align: "center"
						}
					]
				});
			}
		</script>
	</head>

	<body>
		<div class="rightup" style="border: 0px solid gray; background-color: #CCCCCC; height: 30px; font-size: 20;">
			当前位置：供应商管理>供应商基本信息
		</div>
		<div class="row col-md-12">
			<table id="tblComputer"></table>
		</div>
		<div class="row col-md-10" style="margin-top: 20px;">
			<button class="btn btn-success" id="btnNew">新增</button>
			<button class="btn btn-warning" id="btnUpdate">修改</button>
			<button class="btn btn-danger" id="btnDel">删除</button>
			<button class="btn btn-danger" id="btnEnd">倒闭</button>
		</div>
<!--模态框处理-->
		<div class="modal fade" id="Divdata" tabindex="-1" aria-labellebdy="myModelLable" aria-hidden="hidden">
			<div class="modal-dialog">
				<div class="modal-content">
					<!--模态标题-->
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">关闭</button>
						<h4 class="modal-title">信息</h4>
					</div>
					<!--主体表单-->
					<div class="modal-body form-inline">
						<div class="form-group">
							<label class="control-label" for="leiDatausername">设备类型</label>
							<input type="text" class="form-control" id="leiDatausername" name="Dataleixing" maxlength="20"/>
						</div>
						<div class="form-group">
							<lable class="control-lable" for="">类型</lable>
							<select id="selRole" name="role" class="form-control"></select>
						</div>
						<div class="form-group">
							<label class="control-label" for>服务器牌</label>
							<input type="text" class="form-control" id="txtDatausername" name="Datapinpai" maxlength="20"/>
						</div>
						<br /><br />
						<div class="form-group">
							<label class="control-label" for>购&nbsp;买&nbsp;人&nbsp;</label>
							<input type="text" class="form-control" id="txtDatausername" name="Datauser" maxlength="20"/>
						</div>
						<div class="form-group">
							<label class="control-label" for>联系方式</label>
							<input type="text" class="form-control" id="txtDatausername" name="Datausernum" maxlength="20"/>
						</div>
						<br /><br />
						<div class="form-group">
							<label class="control-label" for>供&nbsp;应&nbsp;商&nbsp;</label>
							<input type="text" class="form-control" id="txtDatausername" name="Datashang" maxlength="20"/>
						</div>
						<div class="form-group">
							<label class="control-label" for>联系方式</label>
							<input type="text" class="form-control" id="txtDatausername" name="Datashangnum" maxlength="20"/>
						</div>
					</div>
					<div class="modal-footer">
						<button type="button" id="btnSave" class="btn btn-info" data-dismiss="modal" aria-hidden="true" onclick="msave()">保存</button>
						<button type="button" id="btnoff" class="btn btn-default" >重置</button>
					</div>
				</div>
			</div>
		</div>
		<!--模态框处理-->
		<div class="modal fade" id="Divdata" tabindex="-1" aria-labellebdy="myModelLable" aria-hidden="hidden">
			<div class="modal-dialog">
				<div class="modal-content">
					<!--模态标题-->
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">关闭</button>
						<h4 class="modal-title">信息</h4>
					</div>
					<!--主体表单-->
					<div class="modal-body form-inline">
						<div class="form-group">
							<label class="control-label" for="leiDatausername">设备类型</label>
							<input type="text" class="form-control" id="leiDatausername" name="Dataleixing" maxlength="20"/>
						</div>
						<div class="form-group">
							<lable class="control-lable" for="">类型</lable>
							<select id="selRole" name="role" class="form-control"></select>
						</div>
						<div class="form-group">
							<label class="control-label" for>服务器牌</label>
							<input type="text" class="form-control" id="txtDatausername" name="Datapinpai" maxlength="20"/>
						</div>
						<br /><br />
						<div class="form-group">
							<label class="control-label" for>购&nbsp;买&nbsp;人&nbsp;</label>
							<input type="text" class="form-control" id="txtDatausername" name="Datauser" maxlength="20"/>
						</div>
						<div class="form-group">
							<label class="control-label" for>联系方式</label>
							<input type="text" class="form-control" id="txtDatausername" name="Datausernum" maxlength="20"/>
						</div>
						<br /><br />
						<div class="form-group">
							<label class="control-label" for>供&nbsp;应&nbsp;商&nbsp;</label>
							<input type="text" class="form-control" id="txtDatausername" name="Datashang" maxlength="20"/>
						</div>
						<div class="form-group">
							<label class="control-label" for>联系方式</label>
							<input type="text" class="form-control" id="txtDatausername" name="Datashangnum" maxlength="20"/>
						</div>
					</div>
					<div class="modal-footer">
						<button type="button" id="btnSave" class="btn btn-info" data-dismiss="modal" aria-hidden="true" onclick="msave()">保存</button>
						<button type="button" id="btnoff" class="btn btn-default" >重置</button>
					</div>
				</div>
			</div>
		</div>
		<!--模态框处理-->
		<div class="modal fade" id="Divdata" tabindex="-1" aria-labellebdy="myModelLable" aria-hidden="hidden">
			<div class="modal-dialog">
				<div class="modal-content">
					<!--模态标题-->
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">关闭</button>
						<h4 class="modal-title">信息</h4>
					</div>
					<!--主体表单-->
					<div class="modal-body form-inline">
						<div class="form-group">
							<label class="control-label" for="leiDatausername">设备类型</label>
							<input type="text" class="form-control" id="leiDatausername" name="Dataleixing" maxlength="20"/>
						</div>
						<div class="form-group">
							<lable class="control-lable" for="">类型</lable>
							<select id="selRole" name="role" class="form-control"></select>
						</div>
						<div class="form-group">
							<label class="control-label" for>服务器牌</label>
							<input type="text" class="form-control" id="txtDatausername" name="Datapinpai" maxlength="20"/>
						</div>
						<br /><br />
						<div class="form-group">
							<label class="control-label" for>购&nbsp;买&nbsp;人&nbsp;</label>
							<input type="text" class="form-control" id="txtDatausername" name="Datauser" maxlength="20"/>
						</div>
						<div class="form-group">
							<label class="control-label" for>联系方式</label>
							<input type="text" class="form-control" id="txtDatausername" name="Datausernum" maxlength="20"/>
						</div>
						<br /><br />
						<div class="form-group">
							<label class="control-label" for>供&nbsp;应&nbsp;商&nbsp;</label>
							<input type="text" class="form-control" id="txtDatausername" name="Datashang" maxlength="20"/>
						</div>
						<div class="form-group">
							<label class="control-label" for>联系方式</label>
							<input type="text" class="form-control" id="txtDatausername" name="Datashangnum" maxlength="20"/>
						</div>
					</div>
					<div class="modal-footer">
						<button type="button" id="btnSave" class="btn btn-info" data-dismiss="modal" aria-hidden="true" onclick="msave()">保存</button>
						<button type="button" id="btnoff" class="btn btn-default" >重置</button>
					</div>
				</div>
			</div>
		</div>
		<!--模态框处理-->
		<div class="modal fade" id="Divdata" tabindex="-1" aria-labellebdy="myModelLable" aria-hidden="hidden">
			<div class="modal-dialog">
				<div class="modal-content">
					<!--模态标题-->
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">关闭</button>
						<h4 class="modal-title">信息</h4>
					</div>
					<!--主体表单-->
					<div class="modal-body form-inline">
						<div class="form-group">
							<label class="control-label" for="leiDatausername">设备类型</label>
							<input type="text" class="form-control" id="leiDatausername" name="Dataleixing" maxlength="20"/>
						</div>
						<div class="form-group">
							<lable class="control-lable" for="">类型</lable>
							<select id="selRole" name="role" class="form-control"></select>
						</div>
						<div class="form-group">
							<label class="control-label" for>服务器牌</label>
							<input type="text" class="form-control" id="txtDatausername" name="Datapinpai" maxlength="20"/>
						</div>
						<br /><br />
						<div class="form-group">
							<label class="control-label" for>购&nbsp;买&nbsp;人&nbsp;</label>
							<input type="text" class="form-control" id="txtDatausername" name="Datauser" maxlength="20"/>
						</div>
						<div class="form-group">
							<label class="control-label" for>联系方式</label>
							<input type="text" class="form-control" id="txtDatausername" name="Datausernum" maxlength="20"/>
						</div>
						<br /><br />
						<div class="form-group">
							<label class="control-label" for>供&nbsp;应&nbsp;商&nbsp;</label>
							<input type="text" class="form-control" id="txtDatausername" name="Datashang" maxlength="20"/>
						</div>
						<div class="form-group">
							<label class="control-label" for>联系方式</label>
							<input type="text" class="form-control" id="txtDatausername" name="Datashangnum" maxlength="20"/>
						</div>
					</div>
					<div class="modal-footer">
						<button type="button" id="btnSave" class="btn btn-info" data-dismiss="modal" aria-hidden="true" onclick="msave()">保存</button>
						<button type="button" id="btnoff" class="btn btn-default" >重置</button>
					</div>
				</div>
			</div>
		</div>
	</body>

</html>